# Maintainer: David Runge <dave@sleepmap.de>
_name=OSC2MIDI
pkgname=osc2midi
pkgver=0.2.5
pkgrel=2
pkgdesc="A highly flexible and configurable OSC to JACK MIDI (and back) bridge"
arch=('loong64' 'x86_64')
url="https://github.com/ssj71/osc2midi"
license=('GPL3')
groups=('pro-audio')
depends=('jack' 'liblo')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ssj71/${pkgname}/archive/v${pkgver}.tar.gz")
sha512sums=('ef29e47157d112f4960d61e14b0568de911da21c4ecef30e93d569a3806f91dece87d81b9c69bf67b3b7a5448f6c5f82b3f3ec7714874e4728b34cf2684ca352')

prepare() {
  mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
  cd "$pkgname-$pkgver"
  mkdir -v build
}

build() {
  cd "$pkgname-$pkgver/build"
  cmake .. \
        -DCMAKE_INSTALL_PREFIX=/usr
}

package() {
  cd "$pkgname-$pkgver/build"
  make DESTDIR="$pkgdir/" install
  install -vDm 644 ../{README,syntax}.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}
